/*
* $Id: ViewInspectItems.java 234 2010-12-29 13:37:20Z volokaleks@yandex.ru $
*
* Copyright 2008-2010 by Volokitin Alexey
* All rights reserved
*
*/
package apiary.component.settings;

import apiary.Apiary;
import apiary.settings.SettingsRecord;
import apiary.ui.SettingForm;

/**
 * Sets the data view inspections
 * @author lexus
 */
public class ViewInspectItems extends SettingsItem {

    /**
     * Constructor
     * @param form settings form
     */
    public ViewInspectItems(SettingForm form) {
        super(form);
        Apiary apiary = Apiary.getInstance();
        mainCategory = getCategoryItem(ID_PARENT,
                                       apiary.getLocaleString("InspectView"),
                                       false);
        String id = String.valueOf(SettingsRecord.GOODS_HONEY);
        String name = apiary.getLocaleString("GoodsHoney");
        Boolean state = (Boolean)getItem(new Integer(SettingsRecord.GOODS_HONEY));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.PUMP_HONEY);
        name = apiary.getLocaleString("PumpHoney");
        state = (Boolean)getItem(new Integer(SettingsRecord.PUMP_HONEY));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.FEEDING);
        name = apiary.getLocaleString("Feeding");
        state = (Boolean)getItem(new Integer(SettingsRecord.FEEDING));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.OPEN_BROOD);
        name = apiary.getLocaleString("OpenBrood");
        state = (Boolean)getItem(new Integer(SettingsRecord.OPEN_BROOD));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.SEAL_BROOD);
        name = apiary.getLocaleString("SealBrood");
        state = (Boolean)getItem(new Integer(SettingsRecord.SEAL_BROOD));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.GIVE_WOX);
        name = apiary.getLocaleString("GiveWox");
        state = (Boolean)getItem(new Integer(SettingsRecord.GIVE_WOX));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.AMBROSIA);
        name = apiary.getLocaleString("Ambrosia");
        state = (Boolean)getItem(new Integer(SettingsRecord.AMBROSIA));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.DISEASES);
        name = apiary.getLocaleString("Diseases");
        state = (Boolean)getItem(new Integer(SettingsRecord.DISEASES));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
        id = String.valueOf(SettingsRecord.NOTE_INSPECT);
        name = apiary.getLocaleString("Note");
        state = (Boolean)getItem(new Integer(SettingsRecord.NOTE_INSPECT));
        if(state == null)
            state = Boolean.FALSE;
        settingCategories.addElement(getCategoryItem(id,name, state.booleanValue()));
    }

}
